import { postRequest1, getRequest1 } from "@/utils/request1";

// 获取资产余额
export const getBalanceApi = (param) => {
  return getRequest1("/api/v2/account/balance", param);
};

// 获取资产余额
export const getAssetsApi = (param) => {
  return getRequest1("/api/v2/account/assets", param);
};

// 获取冻结记录
export const getFrozenRecordsApi = (param) => {
  return getRequest1("/api/v2/account/frozen/records", param);
};

// 获取待入账资金列表（在途订单）
export const getPendingRecordsApi = (param) => {
  return getRequest1("/api/v2/account/pending/records", param);
};
//法币资产流水
export const getAssetsRecordsApi = (param) => {
  return getRequest1("/api/v2/account/assets/records", param);
};

/**
 * 兑换USDM
 * @param {*} data.amount   金额
 * @param {*} data.currency   币种名称
 * @returns
 */
export const postExChangeCoin = (data) => {
  return postRequest("/api/v2/account/exchange", data);
};

/**
 *
 * @param {*} param.currency     币种
 * @returns
 */
export const getExchangeOrderRecordsApi = (param) => {
  return getRequest1("/api/v2/account/exchange/order", param);
};
